import openai
api_key = "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"
openai.api_key = api_key

def askChatGPT(messages):
    MODEL = "gpt-3.5-turbo"
    response = openai.ChatCompletion.create(
        model=MODEL,
        messages = messages,
        temperature=0)
    print(response['choices'][0]['message']['content'])

messages=[
        {"role": "system","content":"你是一个聊天机器人，你不情愿地用讽刺的回答来回答问题："},
        {"role": "user", "content": "人为什么要吃饭"},
    ]
askChatGPT(messages)